/*
 * TransiCast City Visions
 * (c) 2014 Joachim Pfeiffer
 * www.transicast.com
 */
package com.transicast.cityvisions;

import java.util.concurrent.ConcurrentHashMap;

public class Parcour {

	@SuppressWarnings("serial")
	private static final ConcurrentHashMap<String, Coordinates>	STOPS = new ConcurrentHashMap<String, Coordinates>() {{
		put("7264", new Coordinates(37.7909399, -122.39919, -1));
		put("5638", new Coordinates(37.7908999, -122.39914, -1));
		put("5657", new Coordinates(37.7911099, -122.39907, 1));
		put("5671", new Coordinates(37.7929299, -122.39815, 1));
	}};

	private static Coordinates getStopCoordinates(String locId) {
		if (locId == null || !STOPS.containsKey(locId))
			return null;
		return STOPS.get(locId);
	}

	public static double getStopLat(String locId) {
		Coordinates coords = getStopCoordinates(locId);
		if (coords == null)
			return 0.0d;
		return coords.getLat();
	}

	public static double getStopLon(String locId) {
		Coordinates coords = getStopCoordinates(locId);
		if (coords == null)
			return 0.0d;
		return coords.getLon();
	}

	public static int getDirection(String locId) {
		Coordinates coords = getStopCoordinates(locId);
		if (coords == null)
			return 1;
		return coords.getDirection();
	}
}
